package Demo_8_28;

import java.util.Scanner;

public class Demo08_Main {
    public static void main(String[] args) {
        Demo08 demo08 = new Demo08();
        Scanner sca = new Scanner(System.in);

        while (true){
            System.out.println("输入第一个数字");
            double x = sca.nextDouble();
            System.out.println("输入符号");
            String fuhao = sca.next();
            System.out.println("输入第二个数字");
            double y = sca.nextDouble();


            double num;
            switch (fuhao){
                case "+":
                    num = demo08.and(x,y);
                    System.out.println(num);
                    break;
                case "-":
                    num = demo08.subtract(x,y);
                    System.out.println(num);
                    break;
            }
        }
    }
}
